# web/utils/response.py

class Result:
    @staticmethod
    def success(data=None, message="操作成功", code=200):
        return {
            "code": code,
            "message": message,
            "data": data
        }

    @staticmethod
    def error(message="系统错误", code=500, data=None):
        return {
            "code": code,
            "message": message,
            "data": data
        }
